/*
*  Copyright 2019-2020 Zheng Jie
*
*  Licensed under the Apache License, Version 2.0 (the "License");
*  you may not use this file except in compliance with the License.
*  You may obtain a copy of the License at
*
*  http://www.apache.org/licenses/LICENSE-2.0
*
*  Unless required by applicable law or agreed to in writing, software
*  distributed under the License is distributed on an "AS IS" BASIS,
*  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*  See the License for the specific language governing permissions and
*  limitations under the License.
*/
package me.zhengjie.modules.cspimp.esrz.domain;

import lombok.Data;
import cn.hutool.core.bean.BeanUtil;
import io.swagger.annotations.ApiModelProperty;
import cn.hutool.core.bean.copier.CopyOptions;
import me.zhengjie.base.BaseCspImpEntity;

import javax.persistence.*;
import java.sql.Timestamp;
import java.io.Serializable;

/**
* @website https://docs.auauz.net
* @description /
* @author 黄星星
* @date 2020-05-30
**/
@Entity
@Data
@Table(name="esrz_hidden_risk_ledger_manage")
public class EsrzHiddenRiskLedgerManage extends BaseCspImpEntity implements Serializable {

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "id")
    @ApiModelProperty(value = "主键")
    private Long id;

    @Column(name = "dep_id")
    @ApiModelProperty(value = "部门主键")
    private Long depId;

    @Column(name = "dep_name")
    @ApiModelProperty(value = "部门名称")
    private String depName;

    @Column(name = "hidden_risk_content")
    @ApiModelProperty(value = "隐患内容")
    private String hiddenRiskContent;

    @Column(name = "risk_level")
    @ApiModelProperty(value = "风险等级")
    private String riskLevel;

    @Column(name = "change_requirement")
    @ApiModelProperty(value = "更改要求")
    private String changeRequirement;

    @Column(name = "rectification_time_limit")
    @ApiModelProperty(value = "整改时限")
    private Timestamp rectificationTimeLimit;

    @Column(name = "interim_precautions")
    @ApiModelProperty(value = "临时防范措施")
    private String interimPrecautions;

    @Column(name = "rectifier_id")
    @ApiModelProperty(value = "整改责任人")
    private Integer rectifierId;

    @Column(name = "rectifier_name")
    @ApiModelProperty(value = "整改责任人姓名")
    private String rectifierName;

    public void copy(EsrzHiddenRiskLedgerManage source){
        BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true));
    }
}